from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.webdriver import WebDriver


def get_driver() -> WebDriver:
    options = Options()
    options.add_argument(r'--user-data-dir=C:\Users\19714\AppData\Local\Google\Chrome\User Data')
    # options.add_experimental_option("debuggerAddress", "127.0.0.1:9898")
    driver = webdriver.Chrome(executable_path='tools/chromedriver91.exe', options=options)
    driver.implicitly_wait(5)
    driver.set_window_rect(50, 50, 1500, 1000)
    return driver
